<html>
<head><meta charset="utf-8"><title>const-eval-enums-niche-optimizations · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html">const-eval-enums-niche-optimizations</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="154638614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154638614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154638614">(Jan 08 2019 at 11:33)</a>:</h4>
<p>I am trying to figure out a recent memory usage regression and for that I had a look at how much memory constants are using. Something seems like it's not adding up. I created a small playground example that shows my problem: <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=de695b292b3e1d6f21043293c76c2996" target="_blank" title="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=de695b292b3e1d6f21043293c76c2996">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=de695b292b3e1d6f21043293c76c2996</a></p>



<a name="154638677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154638677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154638677">(Jan 08 2019 at 11:34)</a>:</h4>
<p>The <code>Scalar</code> enum is 24 bytes in size (a <code>u128</code> (16 bytes) a <code>u8</code> (1 byte) and a discriminant (1 byte)). The missing 6 bytes are padding</p>



<a name="154638682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154638682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154638682">(Jan 08 2019 at 11:34)</a>:</h4>
<p>So far so good, I can live with that</p>



<a name="154638700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154638700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154638700">(Jan 08 2019 at 11:35)</a>:</h4>
<p>But then <code>ConstValue</code> takes up <code>56</code> bytes, even though I would have assumed the two <code>Scalar</code>s to add up to <code>48</code> and the discriminant of <code>ConstValue</code> would end up in the <code>Scalar</code>'s padding</p>



<a name="154638708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154638708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154638708">(Jan 08 2019 at 11:35)</a>:</h4>
<p>or can't we use that padding because writing to one of the scalars would overwrite the padding (and thus nuke the discriminant)?</p>



<a name="154639175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639175">(Jan 08 2019 at 11:46)</a>:</h4>
<p>Contents of padding in a type are undefined</p>



<a name="154639190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639190">(Jan 08 2019 at 11:46)</a>:</h4>
<p>so while it would be possible to use "padding" that belonged to the containing type (i.e. <code>(Scalar, Scalar)</code>), it is not possible to use Scalar’s own padding for this.</p>



<a name="154639212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639212">(Jan 08 2019 at 11:47)</a>:</h4>
<p>so... If I added an <code>enum Foo { Bar = 0 }</code> field to the type I could overwrite that assumption and niche opts could fill in the field with other values to encode the discriminant?</p>



<a name="154639273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639273">(Jan 08 2019 at 11:49)</a>:</h4>
<p>Maybe I explained it unwell… The niche finding optimisation should not and cannot, I believe, operate recursively. I.e. regardless of what padding <code>Scalar</code> has, niche filling a <code>(Scalar, Scalar)</code> sees a tuple of two opaque 24-byte blobs… I believe…</p>



<a name="154639285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639285">(Jan 08 2019 at 11:49)</a>:</h4>
<p>oh</p>



<a name="154639353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639353">(Jan 08 2019 at 11:50)</a>:</h4>
<p>A good reason, as you intuited, would be somebody overwriting the padding of one of the <code>Scalar</code>s in case a reference was taken to it and assigned through that.</p>



<a name="154639423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639423">(Jan 08 2019 at 11:52)</a>:</h4>
<p>still. If I filled the padding with a known enum like <code>bool</code>, I get another <code>254</code> values to assign to that field for encoding that another variant is in use here</p>



<a name="154639512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639512">(Jan 08 2019 at 11:54)</a>:</h4>
<p>If you changed <code>Scalar</code> itself, sure.</p>



<a name="154639528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639528">(Jan 08 2019 at 11:54)</a>:</h4>
<p>actually</p>



<a name="154639529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639529">(Jan 08 2019 at 11:54)</a>:</h4>
<p>hmm</p>



<a name="154639538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639538">(Jan 08 2019 at 11:54)</a>:</h4>
<p><code>bool</code> is represented as a byte in memory with two valid values</p>



<a name="154639553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639553">(Jan 08 2019 at 11:55)</a>:</h4>
<p>&amp;bool cannot be anything other than 1 or 0 when dereferenced, and if we were to "niche-fill" that, it would be expensive af</p>



<a name="154639604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639604">(Jan 08 2019 at 11:56)</a>:</h4>
<p>because every use of <code>bool</code> would have to mask for the single bit</p>



<a name="154639613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639613">(Jan 08 2019 at 11:56)</a>:</h4>
<p>my turn in having explained badly</p>



<a name="154639626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639626">(Jan 08 2019 at 11:57)</a>:</h4>
<p>But perhaps something like <code>#[compiler_builtin] struct ByteSizedNiche;</code> would work?</p>



<a name="154639633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639633">(Jan 08 2019 at 11:57)</a>:</h4>
<p>I don't want niche optimizations to write anything but <code>0</code> and <code>1</code> to the bool field as long as we are in the variant that has that bool</p>



<a name="154639642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639642">(Jan 08 2019 at 11:57)</a>:</h4>
<p>Other variants who only have padding here can use the field for encoding their discriminant</p>



<a name="154639684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639684">(Jan 08 2019 at 11:58)</a>:</h4>
<p>as long as all variants have padding here</p>



<a name="154639692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639692">(Jan 08 2019 at 11:58)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@Oli</span> sure.</p>



<a name="154639700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639700">(Jan 08 2019 at 11:59)</a>:</h4>
<p>but then you have 2 discriminant values for a single variant?</p>



<a name="154639715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639715">(Jan 08 2019 at 11:59)</a>:</h4>
<p>oh</p>



<a name="154639722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639722">(Jan 08 2019 at 11:59)</a>:</h4>
<p>well I wanted <code>enum Foo { Bar = 0 }</code> anyway</p>



<a name="154639725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639725">(Jan 08 2019 at 11:59)</a>:</h4>
<p>which does not sound so much of a problem until you get to things like <code>std::mem::discriminant_value()</code>.</p>



<a name="154639802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639802">(Jan 08 2019 at 12:01)</a>:</h4>
<p>yaeh idk, the current optimisation is definitely more conservative than it needs to be at times.</p>



<a name="154639824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639824">(Jan 08 2019 at 12:01)</a>:</h4>
<p><code>Result&lt;&amp;'static u32, Foo&gt;</code> is 8 bytes, so we are doing this correctly already <span class="emoji emoji-1f615" title="confused">:confused:</span></p>



<a name="154639881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639881">(Jan 08 2019 at 12:02)</a>:</h4>
<p>What is <code>Foo</code> here?</p>



<a name="154639885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639885">(Jan 08 2019 at 12:02)</a>:</h4>
<p><code>enum Foo { Bar = 0 }</code></p>



<a name="154639893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639893">(Jan 08 2019 at 12:02)</a>:</h4>
<p>oh</p>



<a name="154639905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639905">(Jan 08 2019 at 12:03)</a>:</h4>
<p>doesn't work with <code>#[repr(u64)]</code></p>



<a name="154639907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639907">(Jan 08 2019 at 12:03)</a>:</h4>
<p>it only worked as a ZST</p>



<a name="154639909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639909">(Jan 08 2019 at 12:03)</a>:</h4>
<p>that explains it</p>



<a name="154639911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154639911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154639911">(Jan 08 2019 at 12:03)</a>:</h4>
<p>we're just not doing this optimization :D</p>



<a name="154663607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations/near/154663607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const-eval-enums-niche-optimizations.html#154663607">(Jan 08 2019 at 18:04)</a>:</h4>
<p>fix it; fix it; fix it</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>